import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import { List } from 'components';
import { fetchLists } from 'redux/modules/lists/lists';

const ListContainer = connect(
  ({
    global: { fetching },
    lists,
  }) => ({ fetching, ...lists }),
  dispatch => bindActionCreators({ fetchLists }, dispatch),
)(List);

export default ListContainer;
